package com.city.service.city.impl;

import com.city.domain.city.CityCopnoteObject;
import com.city.repository.city.CityCopnoteObjectRepository;
import com.city.service.city.CityCopnoteObjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @deprecation: 民情日记走访对象分类表
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Service
public class CityCopnoteObjectServiceImpl implements CityCopnoteObjectService {

    @Autowired
    private CityCopnoteObjectRepository objectR;

    @Override
    public List<CityCopnoteObject> getAll() {
        return objectR.getAll();
    }

    @Override
    public String findNameById(Integer mainObjectId) {
        CityCopnoteObject object = objectR.findOne(mainObjectId);
        return object.getName();
    }
}
